// ex3_6.cpp -- mile to gallon
// 1 gallon equal to 3.785  litre
// 1 mile equal to 1.609 kilometer
#include <iostream>

int main(void)
{
    using namespace std;
    double mile1, gallon1, mile_gallon_unit;
    double kilometer1, litre1, kilometer_litre_unit;

    cout << "Enter mile to consume: (:mile): ";
    cin >> mile1;
    cout << "Enter one mile consume gallons: (:gallon/mile): ";
    cin >> mile_gallon_unit;

    cout << mile1 << " miles could drive " << mile1 / mile_gallon_unit 
         << " miles." << endl;

    cout << "Enter mile to consume: (:kilomiters): ";
    cin >> kilometer1;
    cout << "Enter one mile consume gallons: (:kilomiters/litre): ";
    cin >> kilometer_litre_unit;

    cout << kilometer1 << " kilometers could drive " << kilometer1 / kilometer_litre_unit 
         << " kilometers." << endl;
}